package test2

import (
	"websocket/melody"
)

type Session2 struct {
	*melody.Session
	filename string
	uid      int64
}

func NewSession2(s *melody.Session, file string, uid int64) *Session2 {
	return &Session2{
		Session:  s,
		filename: file,
		uid:      uid,
	}
}

func (s *Session2) Filename() string {
	s.RLock()
	defer s.RUnlock()
	return s.filename
}
func (s *Session2) Uid() int64 {
	s.RLock()
	defer s.RUnlock()
	return s.uid
}
